import createjs from "createjs-ts"
import cjs=createjs
export default class BitmapContainer extends cjs.Container {
    private p0:cjs.Shape
    private p1:cjs.Shape
    private p2:cjs.Shape
    constructor() {
        super()
        this.addChild(new cjs.Bitmap("./assets/images/刘亦菲.jpg"))
        this.p0 = new cjs.Shape();
        this.p0.graphics.beginFill("#FF0000").drawCircle(0,0,10);
        //this.p0.setTransform(0,450);
        this.p1 = new cjs.Shape();
        this.p1.graphics.beginFill("#00FF00").drawCircle(0,0,10);
        //this.p1.setTransform(300,150);
        this.p2 = new cjs.Shape();
        this.p2.graphics.beginFill("#0000FF").drawCircle(0,0,10);
        //this.p2.setTransform(550,450);
        this.addChild(this.p2,this.p1,this.p0);
    }
    setRegPoint(x:number,y:number):void {
        this.p0.x=x;
        this.p0.y=y;
    }
    setDoubleFiger(p1:cjs.Point,p2:cjs.Point):void{
        this.p1.x=p1.x;
        this.p1.y=p1.y;
        this.p2.x=p2.x;
        this.p2.y=p2.y;
    }
}